Skip to main content
POST
Costume Background Removal

Authorizations

ailabapi-api-key
string
header
required

API Key for authentication

Body

multipart/form-data
image
file
required
  • Image format: JPEG JPG BMP PNG.
  • Image size: No more than 5 MB.
  • Image resolution: Larger than 50x50px and smaller than 3000x3000px.
out_mode
enum<integer>
default:0

Specifies the type of segmentation result to return, which affects the content of the image_url field.

  • 0: Default segmentation result of the main clothing.
  • 1: Combined segmentation result based on the category specified by cloth_class.
Available options:
0,
1
cloth_class
string

Clothing categories. Multiple values can be submitted at once, separated by commas (,).

  • tops: Tops.
  • coat: Coat.
  • skirt: Skirt.
  • pants: Pants.
  • bag: Bag.
  • shoes: Shoes.
  • hat: Hat.
Example:

"tops,coat,skirt,pants,bag,shoes,hat"

return_form
enum<string>

Specify the desired image format for the output.

  • whiteBK: Returns an image with a white background.
  • mask: Returns a single-channel mask.
  • If not specified, a four-channel PNG image will be returned.
Available options:
mask,
whiteBK

Response

200 - application/json

Success

request_id
string
required

Request ID for debugging.

log_id
string
required

Log ID for debugging.

error_detail
object
required
data
object

The content of the result data returned.